#ifndef __PROMPT_H
#define __PROMPT_H

#include <event2/bufferevent.h>


enum userType {
    E_PC = 0,
    E_PEN = 1,
};

void *prompt_init(void *arg);
void show_prompt_data();
void readFromPipe();
u_int32_t add_user(struct bufferevent *bev,char *name,int PC_PEN_flag);
int64_t gettimestamp(u_int32_t position);
int64_t get_pen_timestamp(u_int32_t pos);
void update_timestamp(u_int32_t position);
u_int32_t find_pos_byBev(struct bufferevent *bev);
char *find_name_byBev(struct bufferevent *bev);
u_int32_t find_pen_pos_byName(char *name);
u_int8_t is_study(u_int32_t pos);
int set_study_status(u_int32_t pos,u_int8_t is_study);


void del_user(struct bufferevent *bev);

#endif  //!__PROMPT_H